package edu.zqu.instructionalMatters.project.service;

import edu.zqu.instructionalMatters.project.service.impl.CourseServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.math.BigInteger;

/**
 * @Author 何文东
 * @Date 2020/7/23 16:01
 * @Description: 调用第05、06组.专业，课程信息的服务获取课程名称，待该模块提供相应API后仍需修改完善
 * @Version 1.0
 */
@FeignClient(name = "GetCourseName", url = "http://localhost:8050/permission", fallback = CourseServiceImpl.class)
@Primary
public interface CourseService {
    /**
     * 获取课程名称
     */
    @RequestMapping(value = "/api/getCollegeName/{courseId}", method = RequestMethod.GET)
    public String getCourseName(@PathVariable BigInteger courseId);
}
